<!DOCTYPE html>
<html lang="zxx">
<head>
    <title>Fort - 关于我们</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8">

    <!-- External CSS libraries -->
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="css/bootstrap-submenu.css">

    <link rel="stylesheet" type="text/css" href="css/bootstrap-select.min.css">
    <link rel="stylesheet" type="text/css" href="css/magnific-popup.css">
    <link rel="stylesheet" href="css/leaflet.css" type="text/css">
    <link rel="stylesheet" href="css/map.css" type="text/css">
    <link rel="stylesheet" type="text/css" href="fonts/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="fonts/flaticon/font/flaticon.css">
    <link rel="stylesheet" type="text/css" href="fonts/linearicons/style.css">
    <link rel="stylesheet" type="text/css" href="css/jquery.mCustomScrollbar.css">
    <link rel="stylesheet" type="text/css" href="css/dropzone.css">
    <link rel="stylesheet" type="text/css" href="css/slick.css">

    <!-- Custom stylesheet -->
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" id="style_sheet" href="css/skins/default.css">

    <!-- Favicon icon -->
    <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link rel="stylesheet" type="text/css" href="css/ie10-viewport-bug-workaround.css">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]>
    <script src="js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <script src="js/jquery-2.2.0.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/bootstrap-submenu.js"></script>
    <script src="js/rangeslider.js"></script>
    <script src="js/jquery.mb.YTPlayer.js"></script>
    <script src="js/bootstrap-select.min.js"></script>
    <script src="js/jquery.easing.1.3.js"></script>
    <script src="js/jquery.scrollUp.js"></script>
    <script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="js/leaflet.js"></script>
    <script src="js/leaflet-providers.js"></script>
    <script src="js/leaflet.markercluster.js"></script>
    <script src="js/dropzone.js"></script>
    <script src="js/slick.min.js"></script>
    <script src="js/jquery.filterizr.js"></script>
    <script src="js/jquery.magnific-popup.min.js"></script>
    <script src="js/jquery.countdown.js"></script>
    <script src="js/maps.js"></script>
    <!--    <script  src="js/app.js"></script>-->

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="js/ie10-viewport-bug-workaround.js"></script>
    <!-- Custom javascript -->
    <script src="js/ie10-viewport-bug-workaround.js"></script>
</head>
<body>


<!-- Main header start -->
<header class="main-header fixed-header-2">
    <div class="container">
        <nav class="navbar navbar-expand-lg navbar-light">
            <a class="navbar-brand company-logo" href="/index">
                <img src="img/logos/black-logo.png" alt="logo">
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                    aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav header-ml">
                    <li class="nav-item dropdown active">
                        <a class="nav-link " href="/activity" id="navbarDropdownMenuLink">
                            活动广场
                        </a>
                    </li>

                    <li class="nav-item dropdown active" id="myself">

                    </li>

                    <li class="nav-item dropdown active" id="admin_center">

                    </li>

                    <li class="nav-item dropdown megamenu-li">
                        <a class="nav-link " href="/about">关于我们</a>
                    </li>
                    <li class="nav-item dropdown megamenu-li">
                        <a class="nav-link " href="/contact">与管理员联系</a>
                    </li>
                </ul>
                <ul class="navbar-nav ml-auto" id="status">

                </ul>
            </div>
        </nav>
    </div>
</header>
<!-- Main header end -->

<!-- Sub banner start -->
<div class="sub-banner">

</div>
<!-- Sub Banner end -->

<!-- About city estate start -->
<div class="about-real-estate  content-area-5">
    <div class="container">
        <div class="row">
            <div class="col-xl-5 col-lg-5 col-md-12 col-sm-12 col-xs-12">
                <div class="about-slider-box simple-slider">
                    <img class="d-block w-100" src="img/about.jpg" alt="about">
                </div>
            </div>
            <div class="col-xl-7 col-lg-7 col-md-12 col-sm-12 col-xs-12">
                <div class="about-text">
                    <h3>欢迎来到 FORT</h3>
                    <p>随着智能手机和微信二维码“扫一扫”的高速发展，越来越多的人习惯了扫码参与各种优惠活动或者抽奖游戏。
                        二维码抽奖已经不再是稀奇的活动了，FORT可以为商家提供一个平台，
                        商家可以轻松设置抽奖内容和条件，然后发布到活动广场；同时，普通用户可以寻找自己感兴趣的抽奖活动，通过扫码即可参与抽奖</p>
                    <p class="mb-0">总的来说，二维码抽奖是一种可以大范围进行裂变，以最低的广告成本，达到最高的品牌宣传效果的一种手段，
                        实体商家可以通过我们这个平台借势，从而达到营销和引流的作用。</p>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- About city estate end -->





<script>

    const token = localStorage.getItem("token");

    $(function f() {
        //token存在
        if (token != null && token != '') {
            $.ajax({
                url:"http://localhost:5761/lottery-system-user/user/api/user/testToken",
                // url: "http://localhost:5710/user/api/user/testToken?token=" + token,
                type: "GET",
                beforeSend: function (XMLHttpRequest) {
                    XMLHttpRequest.setRequestHeader("token", token);
                },
                success: function (result) {
                    // console.log(result);
                    if(result.code==999){
                        alert(result.message);
                        localStorage.removeItem("token");
                        localStorage.removeItem("userNo");
                        document.getElementById("status").className = "navbar-nav ml-auto";
                        var content = "<li class='nav-item'><a class='nav-link' href='/login'>您好，请登录</a></li>" +
                            "<li class='nav-item'><a class='nav-link' href='/register' style='color:red'>免费注册</a></li>";
                        $("#status").append(content);
                        return;
                    }
                    if (result.code == 200) {
                        //正常
                        $("#myself").append("<a class='nav-link' href='/my-profile'>个人中心</a>");
                        var url=result.data.headImgUrl;
                        document.getElementById("status").className = "navbar-buttons ml-auto d-none d-xl-block d-lg-block";
                        var content = "<div><ul><li>" +
                            "<div class='dropdown btns'>" +
                            "<a class='dropdown-toggle' data-toggle='dropdown' id='username'></a>" +
                            "<div class='dropdown-menu'>" +
                            "<a class='dropdown-item' href='/forgot-password'>重置密码</a>" +
                            "<a class='dropdown-item' id='logout'>退出</a>" +
                            "</div></div></li></ul></div>";
                        $("#status").append(content);
                        document.getElementById("username").innerHTML = "<img src="+url+" alt='avatar' >" + result.data.username;
                        //退出
                        $("#logout").click(function () {
                            localStorage.removeItem("token");
                            localStorage.removeItem("userNo");
                            window.location.href = "http://localhost/login";
                        });
                        //如果是商家身份，则添加菜单
                        if(result.data.userType==1){
                            $("#admin_center").append("<a class='nav-link ' href='/lottery_management' >管理中心</a>");
                        }
                        return;
                    } else {
                        //token过期或异常
                        document.getElementById("status").className = "navbar-nav ml-auto";
                        var content = "<li class='nav-item'><a class='nav-link' href='/login'>您好，请登录</a></li>" +
                            "<li class='nav-item'><a class='nav-link' href='/register' style='color:red'>免费注册</a></li>";
                        $("#status").append(content);
                        localStorage.removeItem("token");
                        localStorage.removeItem("userNo");
                        return;
                    }
                }
            });
        } else {
            //token不存在
            document.getElementById("status").className = "navbar-nav ml-auto";
            var content = "<li class='nav-item'><a class='nav-link' href='/login'>您好，请登录</a></li>" +
                "<li class='nav-item'><a class='nav-link' href='/register' style='color:red'>免费注册</a></li>";
            $("#status").append(content);
            return;
        }
    });


</script>

</body>
</html>